A data processing system provides several hardware and/or software resources, which are used to perform different operations (or tasks). Whenever the resources are shared among multiple tasks competing for their access, the data processing system must include a resource manager that controls their allocation correctly. Particularly, the resource manager grants access to the resources according to corresponding constraints (such as in mutual exclusion); moreover, the resource manager prevents, or at least detects, any critical condition in the system (such as a deadlock, a livelock or a starvation). For example, a deadlock can arise when two tasks require a pair of resources at the same time; in this case, it is possible that a first task be granted access to a first resource and a second task be granted access to a second resource; therefore, the first task waits for the second task to release the second resource and the second task waits for the first task to release the first resource. As a consequence, no task can proceed (unless one of them is preempted).
The complexity of the above-described activity is strongly increased in a data processing system with distributed architecture. Indeed, in this case each task running on a specific computer of the system can access resources that are dispersed across the system on different computers. A typical example is that of a hierarchical system, wherein the computers are organized into a tree; in this case, each task running on a generic node of the tree is allowed to access any resource that is defined in a path between the node itself and a root of the tree.
A solution known in the art for controlling the allocation of resources in a distributed system (and especially in a hierarchical system) consists of providing a central resource manager for the whole system. Whenever a task needs a set of resources for its execution, a corresponding request is transmitted to the central resource manager. The central resource manager controls all the resources of the system; therefore, each resource is allocated to the requesting task as soon as it is available.
A drawback of the above-described architecture is that the central resource manager is a bottleneck for the performance of the system (since all the requests must be processed by this component).
Particularly, any failure of the central resource manager prevents the allocation of every resource, thereby impairing operation of the whole system.
The known structure also involves a high traffic of messages between the different nodes of the system and the central resource manager (since the access to each resource is granted individually); this results in an overhead of a corresponding communication infrastructure.
Moreover, the central resource manager must implement complex algorithms for preventing (or detecting) possible critical conditions in the system.